﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EffortsTracker
{
    public partial class AddProjectView : UserControl
    {
        TrackerView trackerView;
        public AddProjectView(TrackerView trackerView)
        {
            this.trackerView = trackerView;
            InitializeComponent();
            trackerView.Height = this.Height + 40;
            trackerView.Width = this.Width + 25;
        }

        private void addButton_Click(object sender, EventArgs e)
        {
            Project project = new Project(nameTextBox.Text);
            project.add();
            trackerView.panel1.Controls.Clear();
            trackerView.panel1.Controls.Add(new TrackerUserControl(trackerView, project));
        }
    }
}
